<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('设置结算')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: jasny-bootstrap-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-price-add">
        <input type="hidden"  th:value="${agentNum}" name="agentNum"/>
        <input type="hidden"  th:value="${actId}" name="actId"/>
        <table class="table table-bordered table-striped table-top" style="text-align: center">
            <thead>
            <tr>
                <th style="text-align:center;" colspan="2">交易类型</th>
                <th style="text-align:center;">交易方式</th>
                <th style="text-align:center;">结算类型</th>
                <th style="text-align:center;">结算底价%</th>
                <th style="text-align:center;">封顶成本(元/笔)</th>
                <th style="text-align:center;">附加手续费(元/笔)</th>
            </tr>
            </thead>
            <tbody>
          <!--  <tr>
                <td  rowspan="2" colspan="2">云闪付</td>
                <td  rowspan="2"></td>
            </tr>-->
            <tr>
                <td  rowspan="4" colspan="2">刷卡</td>
                <td  rowspan="2">借记卡</td>
            </tr>
            <tr>
                <td >D+0</td>
                <td ><input type="text" required class="form-control" min='0' th:value="${price.s0_shuakaJiejika}" name="s0_shuakaJiejika"    /> </td>
                <td ><input type="text" required class="form-control" min='0' th:value="${price.s0_shuakaJiejikaFd}" name="s0_shuakaJiejikaFd" /></td>
                <td  ><input type="text" required class="form-control fj" min='0' th:value="${price.s0_shuakaJiejikaFj}" name="s0_shuakaJiejikaFj"  /> </td>
                <!--<td ></td>
                <td ></td>-->
            </tr>
            <tr>
                <td  rowspan="2">贷记卡</td>
            </tr>
            <tr>
                <td >D+0</td>
                <td ><input type="text" required class="form-control" min='0' th:value="${price.s0_shuakaDaijika}" name="s0_shuakaDaijika"  /> </td>
                <td ></td>
                <td  ><input type="text" required class="form-control fj" min='0' th:value="${price.s0_shuakaDaijikaFj}" name="s0_shuakaDaijikaFj"  /> </td>
                <!--    <td  ></td>
                    <td  ></td>-->
            </tr>
            <tr>
                <td  rowspan="4" colspan="2">银联二维码</td>
                <td  rowspan="2">借记卡</td>
            </tr>
            <tr>
                <td >D+0</td>
                <td ><input type="text" required class="form-control" min='0' th:value="${price.s0_qrJiejika}" name="s0_qrJiejika"    /> </td>
                <td ><input  type="text" required class="form-control" min='0' th:value="${price.s0_qrJiejikaFd}" name="s0_qrJiejikaFd" /></td>
                <td  ><input type="text" required class="form-control fj" min='0' th:value="${price.s0_qrJiejikaFj}" name="s0_qrJiejikaFj"  /> </td>
                <!--<td ></td>
                <td ></td>-->
            </tr>
            <tr>
                <td  rowspan="2">贷记卡</td>
            </tr>
            <tr>
                <td >D+0</td>
                <td ><input type="text" required class="form-control" min='0' th:value="${price.s0_qrDaijika}" name="s0_qrDaijika"  /> </td>
                <td ></td>
                <td  ><input type="text" required class="form-control fj" min='0' th:value="${price.s0_qrDaijikaFj}" name="s0_qrDaijikaFj"  /> </td>
                <!--    <td  ></td>
                    <td  ></td>-->
            </tr>

            <tr>
                <td  rowspan="2" colspan="2">云闪付</td>
                <td  rowspan="2">1000元以下</td>
            </tr>
            <tr>

                <td  >D+0</td>
                <td  ><input type="text" required class="form-control" min='0' th:value="${price.yunshanfu0}" name="yunshanfu0"  /> </td>
                <td  ></td>
                <td  ><input type="text" required class="form-control fj" min='0' th:value="${price.yunshanfu0Fj}" name="yunshanfu0Fj"   /></td>
                <!--     <td  ></td>
                     <td  ></td>-->
            </tr>

            <tr>
                <td  rowspan="2" colspan="2">微信</td>
                <td  rowspan="2">贷记卡</td>
            </tr>
            <tr>
                <td  >D+0</td>
                <td  ><input type="text" required class="form-control" min='0' th:value="${price.saoma0Wx}" name="saoma0Wx"  /> </td>
                <td  ></td>
                <td  ><input type="text" required class="form-control fj" min='0' th:value="${price.saoma0FjWx}" name="saoma0FjWx"   /> </td>
                <!--  <td  ></td>
                  <td  ></td>-->
            </tr>

            <tr>
                <td  rowspan="2" colspan="2">支付宝</td>
                <td  rowspan="2">贷记卡</td>
            </tr>
            <tr>
                <td >D+0</td>
                <td ><input type="text" required class="form-control" min='0' th:value="${price.saoma0Zfb}" name="saoma0Zfb"  /> </td>
                <td ></td>
                <td ><input type="text" required class="form-control fj" min='0' th:value="${price.saoma0FjZfb}" name="saoma0FjZfb"   /> </td>
                <!-- <td ></td>
                 <td ></td>-->
            </tr>
            </tbody>
        </table>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: jasny-bootstrap-js" />
<script th:inline="javascript">

    var prefix = ctx + "agentInfo/agentActActive";
    $("#form-price-add").validate({
        focusCleanup: true
    });


    //附加费监测
    $(".fj").bind('input propertychange change',function(){
        var value = $(this).val();
        if (this.value > 3 || this.value < 0){
            $(".fj").val('')
        } else {
            var v1 = value.replace(/[^0-9]/g,'');
            $(".fj").val(v1)
        }
    })


    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/saveAgentPrice", $('#form-price-add').serialize());
        }
    }

</script>
</body>
</html>
